window.onresize = function (event) {
  let width = window.innerWidth;
  let minWidth = 700;
  let maxWidth = 1200;
  let link = document.createElement("link");

  console.log("width=", width);
  if (width < minWidth) {
    // 路面附着系数 屏幕最小宽度时
    link.href = "./css/roadSurCoeChart_min.css";
    link.rel = "stylesheet";
    document.getElementsByTagName("HEAD")[0].appendChild(link);
  }else  if (width > minWidth && width < maxWidth) {
    // var link = document.createElement("link");
    // 路面附着系数 屏幕正常宽度时
    link.href = "./css/roadSurCoeChart.css";
    link.rel = "stylesheet";
    document.getElementsByTagName("HEAD")[0].appendChild(link);
  }else if (width > maxWidth) {
    // var link = document.createElement("link");
    // 路面附着系数 屏幕最大宽度时
    link.href = "./css/roadSurCoeChart_max.css";
    link.rel = "stylesheet";
    document.getElementsByTagName("HEAD")[0].appendChild(link);
  }
};